home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
cpp_libs
/
linklist
/
source.lha
/
doc
/
lSort.3
< prev
next >
Wrap
Text File
|
1993-08-08
|
1KB
|
54 lines
'.so tmac.clman
.TH "lSort"
.IX lSort
.SH NAME
lSort - Sort a linked list.
.SH SYNOPSIS
int
.BR "lSort" "(id, order, theory, func)"
.br
.RT
.RP
In int id identifier of linked list
.RP
In int order sorting order
.RP
In int theory sorting theory
.RP
In int (*func)() function for comparing the data of 2 nodes
.DT
.SH DESCRIPTION
\fBlSort\fP sorts a linked list in the specified \fIorder\fP, using
the specified \fItheory\fP, and the user defined function \fIfunc\fP,
which compares the data of two nodes. This function must have two
parameters, two pointers to the data of a node. The possible return
values are lSAME, l1LT2 and l2LT1. See the introduction of Generic
Linked List for an example of such a compare function.
.SH PARAMETER DEFINITIONS
.if t .ta 0.2i 1.5i
\fIorder\fP :
.nf
lASCENDING 'a', 'b', 'c', ...
lDESCENDING 'z', 'y', 'x', ...
.fi
\fItheory\fP :
.nf
lBUBBLE bubble sorting algorithm ...
lHEAP heap sorting algorithm ...
lINSERT insert sorting algorithm ...
lQUICK quick sorting algorithm ...
lSELECTION selection sorting algorithm ...
.fi
.SH RETURN CODES
.nf
Return on success :
lSUCCESS
Return on error :
lUNKNOWN_ID, lEMPTY_LIST, lWRONG_ORDER, lWRONG_THEORY
.fi
.SH AUTHOR
.nf
Anita Eijs (TNO - Bouw - BouwInformatica)
Shane Brath (University of Wisconsin)
.fi